<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>

<h2>공지사항 목록</h2>
<table width="100%">
    <tr>
        <td align="right">
            <input type="button" value="신규 등록하기" class="bigBtn"
                onclick="location.href = './regNoticeForm.ga'"
            />
        </td>
    </tr>
</table>

<table align="center" style="background:#eeeeee;width:100%;">
    <tr>
        <td align="right" width="32%">
            검색 &nbsp;
            <select name="searchType" style="width:120px;">
                <option value="전체">전체</option>
                <option value="글제목">글제목</option>
                <option value="글내용">글내용</option>
            </select>
        </td>
        <td align="center">
            <input type="text" name="searchText" style="width:300px;"/>
        </td>
        <td width="32%">
            <input type="button" value="검색" style="width:80px;height:26px;"/>
        </td>
    </tr>
</table>
<br/><br/>

<c:if test="${fn:length( noticeList ) > 0 }">
    <table class="list" cellspacing="0" cellpadding="5" style="text-align:center;width:100%;">
        <tr class="table_title">
            <td width="10%">No.</td>
            <td width="20%">날짜</td>
            <td width="60%">제목</td>
            <td width="10%">조회수</td>
        </tr>
        <c:forEach var="list" items="${noticeList }">
            <tr>
                <td>${list.notice_no }</td>
                <td>${list.regdate }</td>
                <td align="left">&nbsp; <a href="readNotice.ga?notice_no=${list.notice_no }">${list.subject }</a></td>
                <td>${list.count }</td>
            </tr>
        </c:forEach>
    </table>
</c:if>
<c:if test="${fn:length( noticeList ) <= 0 }">
    <table align="center" cellpadding="20">
        <tr>
            <td align="center">내용이 없습니다.</td>
        </tr>
    </table>
</c:if>

</body>
</html>